<?php

namespace App\Http\Controllers;

class HomeController extends Controller {

    public $data = array();

    public function __construct(){
        $this->data['user_agent'] = $this->getUserAgent();
    }

    function index(){
        return view('main' , $this->data);
    }

    function detailPage(){
        return view('detail' , $this->data);
    }

    function answerPage(){
        return view('answer' , $this->data);
    }

    function topicsPage(){
        return view('topics' , $this->data);
    }

    function searchPage(){
        return view('search_question' , $this->data);
    }

    function addQuestionPage(){
        return view('add_question' , $this->data);
    }

    function singleTopicPage($id){
        return view('topic_details' , $this->data);
    }

    function newQuestionsPage(){
        return view('new_questions' , $this->data);
    }
}
